const express = require('express')
let app = express()
app.listen(3000, () => {
    console.log('3000ok');
})


const query=require("./tools/db")




app.get("/userinfo", (req, res) => {


    let sql = `select *  from user`
    let sql1 = `select *  from user where id=2`



    async function getuser() {
        let [err, results] = await query(sql)
        console.log([err, results]);

        let [err1, results1] = await query(sql1);
        console.log([err1, results1]);

    }
    getuser()


    res.send("Ok")




})